package pages;

import org.openqa.selenium.WebElement;

import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import utils.BaseAction;
import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import io.appium.java_client.android.AndroidDriver;

import io.appium.java_client.AppiumBy;


import utils.BaseAction;
public class Ydxxpage {

	AndroidDriver  driver;
	BaseAction action;

	public Ydxxpage(AndroidDriver  driver) {
		this.driver = driver;
		action= new BaseAction(driver);
	}	
public WebElement video() {
	WebElement video = (WebElement) driver.findElement(AppiumBy
			.id("njust.dzh.fitnesssystem:id/videoview"));
	return video;
	
}
public WebElement button() {
	WebElement button = (WebElement) driver.findElement(AppiumBy
			.className("android.widget.ImageButton"));
	return button;
	
}

public WebElement begin1() {
	WebElement begin = (WebElement) driver.findElement(AppiumBy
			.id("njust.dzh.fitnesssystem:id/btn_begin"));
	return begin;		
}
public WebElement btn_pause() {
	WebElement btn_pause = (WebElement) driver.findElement(AppiumBy
			.id("njust.dzh.fitnesssystem:id/btn_pause"));
	return btn_pause;		
}
public WebElement continue1() {
	WebElement continue1 = (WebElement) driver.findElement(AppiumBy
			.id("njust.dzh.fitnesssystem:id/btn_continue"));
	return continue1;		
}
public WebElement stop1() {
	WebElement stop = (WebElement) driver.findElement(AppiumBy
			.id("njust.dzh.fitnesssystem:id/btn_stop"));
	return stop;		
}



public void videoview() throws InterruptedException {	

	action.click(video());
		
}

public void begin() throws InterruptedException {	


	action.click(begin1());
	
}

public void bpause() throws InterruptedException {	
	

	action.click(begin1());
	action.click(btn_pause());
	
}
public void con() throws InterruptedException {	

	action.click(begin1());
	action.click(btn_pause());
	action.click(continue1());
	
}

public void stop() throws InterruptedException {	


	action.click(begin1());
	action.click(stop1());
	
}


	
	
		

}